home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-01 | 1.9 KB | 46 lines | [TEXT/GEOL] |
- Item 8010429 27-Feb-91 05:36PST
-
- From: POWERUP.ENG Power Up Software,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: Command Number Constants
-
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Subject: Command Number Constants
- Gentlepersons,
-
- It would be very handy if the command numbers used by MacApp were described by
- #define macros in MacAppTypes.r, so that the command numbers could be used by
- name in application Rez files.
-
- I recently needed to create a STR# which was to be associated with the cOpen
- command number. I assumed that the string 'cOpen' was #defined in the manner
- described above (in this case, to 20), and that I could say that the STR#'s
- resource ID number was cOpen (actually, 1000 + cOpen, to get it out of
- MacApp's reserved resource ID range). Since this #define did not actually
- exist, I had to use the "magic number" 20 in my rez file (with a comment
- saying that it was intended to match the value assigned to cOpen in the
- definition of the type 'cmnu' in MacAppTypes.r). My application relies on the
- relationship between the command number and the string list resource's ID.
- Should the command number assigned to cOpen change in the future, imagine the
- fun I will have tracking down the inconsistency. (I could stop relying on the
- value of the command number, but only at considerable cost.)
-
- Since we developer types have no control over the integer values assigned to
- these commands, and yet often need to refer to them in resources just as we do
- (and can) in source code, wouldn't it be nice to make them available to us in
- the described manner? Then you could change the values all you wanted,
- without breaking my code (one of your highest compatibility goals, I'm sure.)
- :-)
-
- Hoping to squeeze just one last feature into MacApp 3.0, I remain
-
- Yours,
-
- James Plamondon
-
-